<template>
	<view class="all">
		<view class="title">
			<image :src="touxiangSrc" mode="" class="touxiang" @click="xiugai"></image>
			<view class="name">
				{{username}}
			</view>
			<view class="zhanghao">
				id:815754
			</view>

		</view>
		<view class="content">
			<view class='list' @click="address">我的信息</view>
			<view class='list' @click='myInt'>我的积分</view>

		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				touxiangSrc: null,
				username: null
			}
		},
		methods: {
			xiugai() {
				// console.log(this.touxiangSrc);
			},
			myInt() {
				uni.navigateTo({

					url: '/pages/UserInt/UserInt',

				})
			},
			address() {

				uni.navigateTo({

					url: '/pages/myArddress/myArddress',

				})
			}
		},
		onLoad() {
			var self = this
			uni.getStorage({
				key: 'userImg',
				success: function(res) {
					self.touxiangSrc = res.data
				},
			})
			uni.getStorage({
				key: 'userInfo',
				success: function(res) {
					self.username = res.data
				},
			})

		}
	}
</script>

<style lang="less" scoped="scoped">
	.all {
		width: 750rpx;
		padding: 0;
		margin: 0;
		box-sizing: border-box;

		.title {
			background-color: rgb(248, 132, 88);
			width: 100%;
			height: 300rpx;



			.touxiang {
				width: 150rpx;
				height: 150rpx;
				border-radius: 50% 50%;
				// border: 1px solid red;
				margin: 20rpx 50%;
				transform: translate(-50%);

			}

			.name,
			.zhanghao {
				text-align: center;
				color: white;
			}

			.name {
				font-size: 40rpx;
			}

			.zhanghao {
				font-size: 28rpx;
			}
		}

		.content {
			.list {
				box-sizing: border-box;
				margin: 20rpx 30rpx;
				height: 100rpx;
				box-shadow: #d3d3d3 0 0 4px 0;
				line-height: 100rpx;
				padding-left: 20rpx;
				border-radius: 3px;
			}
		}
	}
</style>
